package com.mouse.magent.server.constant;

import com.mouse.magent.common.util.NettyUtil;
import io.netty.channel.Channel;
import io.netty.channel.ChannelId;
import io.netty.channel.group.ChannelGroup;
import io.netty.channel.group.DefaultChannelGroup;
import io.netty.util.concurrent.GlobalEventExecutor;
import lombok.Getter;
import lombok.Setter;
import lombok.extern.slf4j.Slf4j;

import java.util.Iterator;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.Executors;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.TimeUnit;

@Slf4j
public class ServerConstant {
    @Getter
    private static ChannelGroup remoteChannelGroup = new DefaultChannelGroup(GlobalEventExecutor.INSTANCE);

    @Setter
    @Getter
    private static ChannelGroup proxyChannelGroup = new DefaultChannelGroup(GlobalEventExecutor.INSTANCE);

    //远程Proxy-> 本地
    @Getter
    private static Map<ChannelId, Channel> channelRemoteMap = new ConcurrentHashMap<>();

}
